/*
 * SystemPropertyValueDisplay.java
 *
 * Created on 24 September 2004, 09:11
 * Copyright (C) 2004, Velocityme Partnership
 */

package com.velocityme.client.gui.directory;

import com.velocityme.client.gui.TableSorter;
import com.velocityme.utility.DirectoryDTO;
import com.velocityme.utility.LicenceKey;
import java.util.Collection;

/**
 *
 * @author  Robert Crida Work
 */
public class DirectoryDisplay extends javax.swing.JPanel {
    
    private String[] m_columnNames;
    private DirectoryTableModel m_modelDirectory;
    private TableSorter m_tableSorter;
    
    /** Creates new form ContactDetailTypeValueDisplay */
    public DirectoryDisplay(String[] p_columnNames) {
        m_columnNames = p_columnNames;
        initComponents();
    }
    
    public void setDirectoryDTO(DirectoryDTO p_directoryDTO) {
        m_modelDirectory.setDirectoryDTO(p_directoryDTO);
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    private void initComponents() {//GEN-BEGIN:initComponents
        jScrollPane1 = new javax.swing.JScrollPane();
        m_modelDirectory = new DirectoryTableModel(m_columnNames);
        m_tableSorter = new TableSorter(m_modelDirectory);
        jTableDirectory = new javax.swing.JTable(m_tableSorter);
        m_tableSorter.setTableHeader(jTableDirectory.getTableHeader());

        setLayout(new java.awt.BorderLayout());

        jScrollPane1.setViewportView(jTableDirectory);

        add(jScrollPane1, java.awt.BorderLayout.CENTER);

    }//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTableDirectory;
    // End of variables declaration//GEN-END:variables
    
}
